/********************************************************************************
 *      Copyright:  (C) 2025 TBW
 *                  All rights reserved.
 *
 *       Filename:  socket.h
 *    Description:  This file 
 *
 *        Version:  1.0.0(19/05/25)
 *         Author:  huang zixiao <2027838269@qq.com>
 *      ChangeLog:  1, Release initial version on "19/05/25 20:02:56"
 *                 
 ********************************************************************************/

#ifndef					SOCKET_H
#define					SOCKET_H


typedef struct socket_info_s
{
	int						fd;
    char                  *hostname;
    char                  *service;
	int						status;//-1 disconnected; 1 is connecting

}socket_info_t;

int socket_close(socket_info_t *socket_info);
int socket_connect(socket_info_t *socket_info);
int socket_connected(socket_info_t *socket_info);
int socket_send(socket_info_t *socket_info, char *data, int bytes);


#endif
